Skip to content

Refactor: expandTilde dedup, USE_DEBUGPY gate, jsonrpc env+ConnectionError, _get_settings_by_path#466

Open
edvilme wants to merge 6 commits intomainfrom
phase4/trivial-normalizations
Open

Refactor: expandTilde dedup, USE_DEBUGPY gate, jsonrpc env+ConnectionError, _get_settings_by_path#466
edvilme wants to merge 6 commits intomainfrom
phase4/trivial-normalizations

Conversation

@edvilme
Copy link
Copy Markdown
Contributor

@edvilme edvilme commented Apr 7, 2026

Trivial normalization changes for shared package extraction.

Tracking: #465 | microsoft/vscode-python-tools-extension-template#290

  • 4.0f Deduplicate \�xpandTilde\ (settings.ts → envFile.ts)
  • 4.2a Add \USE_DEBUGPY\ gate to _debug_server.py\
  • 4.2b Add \�nv\ parameter to \start_process()\ in \lsp_jsonrpc.py\
  • 4.2c \lsp_jsonrpc.py: \Exception\ → \ConnectionError\
  • 4.S2 Add _get_settings_by_path()\ to \lsp_server.py\

All changes are backwards-compatible refactoring. No behavioral changes.

edvilme and others added 4 commits April 7, 2026 13:31
Part of Phase 4 normalization (#465).
Removes duplicate expandTilde from settings.ts, exports from envFile.ts.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Part of Phase 4 normalization (#465).
Aligns with black-formatter pattern — only loads debugpy when USE_DEBUGPY is set.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Part of Phase 4 normalization (#465).
Aligns with pylint pattern — allows passing environment variables to subprocess.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ception

Part of Phase 4 normalization (#465).
Aligns with pylint pattern for more specific error typing.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@edvilme edvilme added the debt label Apr 7, 2026
@edvilme edvilme enabled auto-merge (squash) April 7, 2026 20:34
@edvilme edvilme changed the title Phase 4: Trivial normalizations Phase 4: expandTilde dedup, USE_DEBUGPY gate, jsonrpc env+ConnectionError, _get_settings_by_path Apr 7, 2026
@edvilme edvilme changed the title Phase 4: expandTilde dedup, USE_DEBUGPY gate, jsonrpc env+ConnectionError, _get_settings_by_path Refactor: expandTilde dedup, USE_DEBUGPY gate, jsonrpc env+ConnectionError, _get_settings_by_path Apr 7, 2026
@edvilme edvilme force-pushed the phase4/trivial-normalizations branch from ae76d78 to 83bc685 Compare April 8, 2026 20:43
@rchiodo
Copy link
Copy Markdown
Contributor

rchiodo commented Apr 8, 2026

There's still a bunch of unresolved comments?

@edvilme edvilme force-pushed the phase4/trivial-normalizations branch from 83bc685 to 97d40f1 Compare April 9, 2026 01:03
Part of Phase 4 normalization (#465).
Aligns with black/isort/mypy/pylint — adds path-based settings lookup.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@edvilme
Copy link
Copy Markdown
Contributor Author

edvilme commented Apr 9, 2026

Both comments addressed:

  1. Key/value mismatch: Added clarifying comment. WORKSPACE_SETTINGS is keyed by normalized workspaceFS path (see _update_workspace_settings lines 640-657), so the dict lookup is correct. The key IS the workspaceFS value.

  2. Unguarded [0] index: Added empty guard: if not setting_values: return {}

@github-actions github-actions bot mentioned this pull request Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants